package resp

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func Error(c *gin.Context, code int, message string, error interface{}) {
	c.JSON(http.StatusOK, gin.H{
		"code": code,
		"msg":  message,
		"data": error,
	})
}
func Success(c *gin.Context, message string, data interface{}) {
	c.JSON(http.StatusOK, gin.H{
		"code": http.StatusOK,
		"msg":  message,
		"data": data,
	})
}
